package com.googlecode.lemyriapode.type;


public abstract class NewClass extends AChessCat {

    IPredicate predicat;
    IPredicate predicatContinuer;
    IClosure trueclos;
    IClosure falseclos;

    abstract void IfElse(IPredicate predicat, IClosure trueclos, IClosure falseclos);

    abstract void preCondition();

    abstract void postCondition();

    @Override
    public boolean continuer(int n, Object e) {
        return predicatContinuer.eval();
    }

    @Override
    public void executer(int n, Object e) {
        preCondition();
        IfElse(predicat, trueclos, falseclos);
        postCondition();
    }

    @Override
    public abstract Object stopper(int n, Object e);
}
